App.filter('gender_filter', function() {

    var genderHash = {
        1: '男',
        2: '女'
    };


    return function(input) {
        if (!input){
            return '';
        } else {
            var r = null;
            angular.forEach(genderHash,function(value, key){
                if(key == input && r == null){
                    r = value;
                }
            });
            if(r == null){
                console.error("不匹配");
                r = '';
            }
            return r;
        }
    };
});